Scanned probe microscopes can potentially write and read information with nonometric precision and high density. A recent study has shown [S. Hoen, H. J. Mamin and D. Rugar, AppI. Phys. Lett. 64,267 (1994)] that one of most sensitive ways to read information is by measuring an alteration using the force sensing capabilities of the scanned probe tip that imposed the change. However, this study also highlights the fact that using the approach of this study, which involved simply heating the surface and imposing a local structural change, it is not possible to reverse the process and make a write, read and erase cycle. The present invention focuses on an approach that indicates how such a write, read and erase cycle could be completed. This also leads to nanoswitches and nanoswitch arrays.